﻿using System;
using System.ComponentModel;

using TestAutomationFX.Core;
using TestAutomationFX.UI;

namespace Agility.TestProject.AppDriver.UIAutomation
{
    public partial class AgilityExcelUI : UIMap
    {
        private static readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();

        public AgilityExcelUI()
        {
            logger.Debug("--> Entering ctor");
            this.windowName = "Microsoft Excel - Mappe1";
            InitializeComponent();
            logger.Debug("Initialized components");
            logger.Debug("<-- Leaving ctor");
        }

        public AgilityExcelUI(string windowTitle)
        {
            logger.Debug("--> Entering ctor");
            this.windowName = windowTitle;
            InitializeComponent();
            logger.Debug("Initialized components");
            logger.Debug("<-- Leaving ctor");
        }

        public AgilityExcelUI(IContainer container)
        {
            logger.Debug("--> Entering ctor");
            container.Add(this);
            logger.Debug("Added container");

            InitializeComponent();
            logger.Debug("Initialized components");
            logger.Debug("<-- Leaving ctor");
        }

        public new void Dispose()
        {
            this.EXCELApplication.Close();
            this.Dispose(true);
        }

        public UIMsaa ButtonLogon 
        {
            get { return this.Logon; }
            private set { } 
        }

        public UIMsaa ButtonMyIdeas 
        {
            get { return this.MyIdeas; }
            private set { }
        }

        public UIMsaa PageTabAgility 
        {
            get { return this.Agility; }
            private set { }
        }
        
        public UIMsaa DialogLauncherSettings
        { 
            get { return this.PushButton; }
            private set { }
        }

        public UIWindow LoginSettingsDialog 
        {
            get { return this.AgilitySettingsDialog; }
            private set { }
        }

        public UIWindow TextboxUserName 
        {
            get { return this.Username; }
            private set { }
        }

        public UIWindow TextboxPassword 
        {
            get { return this.uiWindow1; }
            private set { }
        }

        public UIWindow ButtonSettingsOk 
        {
            get { return this.OK; }
            private set { }
        }

    }
}
